<p id="instruction">
Click on "Edit Application" to either start or continue to fill out the grant application.  
<br /><br />  
When the application is complete and you are ready to submit to your
principal for approval, click on "Submit Application". Please submit to
your principal for approval on or before Wednesday, September 26, 2007.
Your principal's review and electronic approval prior to noon, October
2, 2007 will automatically submit the application to the Education
Foundation for judging.
<br /><br />
Once the application has been submitted, you will only be able to view the content of the application.
</p>

<table>
	<tr>  
		<th>Application Name</th>
		<th>Closes On</th>
		<th>Notifies On</th>
		<th>Status</th>  
		<th>Actions</th>
	</tr>

  <% for submission in @submissions %>
	<tr>  
		<td><%= submission.cycle.name %></td>
		<td><%= submission.cycle.close_on %></td>   
		<td><%= submission.cycle.notify_on %></td>   
		<td><%= submission.status.name %></td>
		<td>
			<% if submission.status.name == "In Progress" or submission.status.name == "Not Approved"%>

				<%= link_to "Edit Application", :controller => "workitem", :action => "edit", :id => submission %>
				<% if submission.manager %>			
					<br />
					<%= link_to 'Submit Application', { :action => 'submit', :id => submission }, :confirm => 'Are you sure you would like to submit this grant application?  You will not be able to edit it once you submit.  Press \'OK\' to submit.  Press \'Cancel\' to continue working on the application.', :method => :post %>  
					<% else %> 
					<br/>
					Submit Application
					<% end %>
			<% else %>
				<%= link_to "View", :controller => "workitem", :action => "show", :id => submission %>
			<% end %> 	

		</td>
	</tr>

	<% end %>
</table>              